package com.love.cloud.common.mybatis.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.love.cloud.common.mybatis.entity.FileBean;

import java.util.List;
import java.util.Set;

/**
 * @author hongdongqu
 */
public interface FileBeanService extends IService<FileBean> {
    /**
     * 获取到文件信息
     * @param relationId
     * @param relationType
     * @return
     */
    List<FileBean> getFileBeansByRelationInfo(Long relationId, String relationType);

    /**
     * 获取到文件信息
     * @param relationId
     * @param relationType
     * @return
     */
    List<FileBean> getFileBeansByRelationInfo(Set<Long> relationId, String relationType);

    /**
     * 获取到文件信息
     * @param
     * @param relationType
     * @return
     */
    void setBatchFileBeansByRelationInfo(String relationType, List list);

    /**
     * 获取到文件信息
     * @param
     * @param relationType
     * @return
     */
    void setBatchFileBeansByRelationInfo(String relationType, List list, Set<Long> ids);


    /**
     * 保存数据
     * @param fileBeanList
     * @param relationId
     * @param relationType
     * @return
     */
    List<FileBean> saveFileBean(List<FileBean> fileBeanList, Long relationId, String relationType);
    /**
     * 更新文件数据,自己去获取文件信息
     * @param fileBeanList
     * @param relationId
     * @param relationType
     * @return
     */
    List<FileBean> updateFileBean(List<FileBean> fileBeanList, Long relationId, String relationType);
    /**
     * 更新文件数据,有历史文件参数
     * @param fileBeanList
     * @param oldFileBeanList
     * @param relationId
     * @param relationType
     * @return
     */
    List<FileBean> updateFileBean(List<FileBean> fileBeanList, List<FileBean> oldFileBeanList, Long relationId, String relationType);
}
